package com.cheese.crowd.service.impl;

import com.cheese.crowd.entity.admin;

import com.cheese.crowd.entity.adminExample;
import com.cheese.crowd.mapper.adminMapper;
import com.cheese.crowd.service.api.adminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class adminServiceImpl implements adminService {
    @Autowired(required = false)
    private adminMapper adminMapper;

    public void saveAdmin(admin admin) {
        adminMapper.insert(admin);
    }

    public List<admin> getAll() {
        return adminMapper.selectByExample(new adminExample());
    }
}
